/*
 * Main.java
 *
 * Created on 7 de junio de 2007, 10:14
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package wsserver;

import javax.xml.ws.Endpoint;



public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       String wsAddress = "http://localhost:8765/Gpi/ComputerManager";
       
       Endpoint.publish(
            wsAddress, new ComputerManager() );
        
        System.out.println("Web service was published successfuly.\n"+
            "WSDL URL: "+wsAddress+"?WSDL");
        
        // this is the way to make the local web server running until the process is killed
        while (true) {
            try {
                Thread.sleep(2000);
            } catch (InterruptedException ex) {}
        }
    }
    
}

